<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ include file="/common/taglib.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>首页</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <link type="text/css" rel="stylesheet" href="/css/main.css"/>
    <link type="text/css" rel="stylesheet" href="/css/skin.css"/>
    <script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
</head>
<body>

<div id="layout">
    <!-- head start -->
    <%@ include file="decorators/head.jsp"%>
    <!-- head end -->

    <!-- main start -->
    <div id="main">
        <div id="main_right">
            <h1>海淘</h1>
            <div class="hr" style="width:200px;"></div>
            <ul>
                <li><a href="#"><img src="/image/brand/locklock.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/maibaobao.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/baili.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/meiji.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/dove.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/jackjones.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/daphne.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/miracle.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/bencao.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/wenger.png" alt=""></a></li>
            </ul>
        </div>

        <%--<div id="main_left">
            <h1>海淘</h1>
            <div class="hr"></div>
            <c:forEach items="${actionBean.page.elements}" var="product" varStatus="status">
                <c:if test="${(status.count - 2)%3==0 }">
                    <div class="shu"></div>
                </c:if>
                <div class="site" title="${product.name}">
                    <div class="title"><a href="/product.do?detail&id=${product.id}">${product.name}</a></div>
                    <div class="bigpic"><a href="/product.do?detail&id=${product.id}"><img src="${product.picurl}" class="autoImg" align="absmiddle"/></a></div>
                    <p>
                        时间 : <fmt:formatDate value="${product.starttime}" pattern="MM-dd HH:mm"/>
                        <c:if test="${not empty product.recommend}"><span class="recommend">推荐：${product.recommend}</span></c:if><br/>
                        分类：<b style="color:#5183C0;">${product.categorys}</b><br/>
                        商城：<b style="color:#888888;">${product.fromwhere}</b><br/>
                        详细 : <a href="/product.do?detail&id=${product.id}">${product.detail}</a>
                    </p>
                </div>
                <c:if test="${status.count%3==0}">
                    <div class="hr"></div>
                </c:if>
                <c:if test="${(status.count - 2)%3==0 }">
                    <div class="shu"></div>
                </c:if>
            </c:forEach>
            <zk:page page="${actionBean.page}"/>
        </div>--%>

        <div id="main_left">
            <div id="style_list">
                <h1>海淘<span class="right"><a href="###" class="a_style_list" title="列表模式"><img src="/image/style_list_off.jpg"></a>&nbsp;<a href="?style=1&curPage=${param.curPage}" class="a_style_window" title="窗口模式"><img src="/image/style_win_on.jpg"></a></span></h1>
                <div class="hr"></div>
                <c:forEach items="${actionBean.page.elements}" var="product" varStatus="status">
                    <div class="site_l" title="${product.name}">
                        <div class="title_l"><a href="/product.do?detail&id=${product.id}">${product.name}</a></div>
                        <div class="bigpic_l"><a href="/product.do?detail&id=${product.id}"><img src="${product.picurl}" class="autoImg" align="absmiddle"/></a></div>
                        <p>
                            时间 : <fmt:formatDate value="${product.starttime}" pattern="yyyy-MM-dd HH:mm"/>
                            <c:if test="${not empty product.recommend}"><span class="recommend_l">推荐人：${product.recommend}</span></c:if><br/>
                            分类：<b style="color:#5183C0;">${product.categorys}</b>
                            <span class="recommend_l">商城：<b style="color:#888888;">${product.fromwhere}</b></span><br/>
                            详细 : <a href="/product.do?detail&id=${product.id}">${product.detail}</a>
                        </p>
                    </div>
                    <div class="hr"></div>
                </c:forEach>
                <zk:page page="${actionBean.page}"/>
            </div>
            <div id="style_window" class="hide">
                <h1>海淘<span class="right"><a href="/product.do?curPage=${param.curPage}" class="a_style_list" title="列表模式"><img src="/image/style_list_on.jpg"></a>&nbsp;<a href="###" class="a_style_window" title="窗口模式"><img src="/image/style_win_off.jpg"></a></span></h1>
                <div class="hr"></div>
                <c:forEach items="${actionBean.page.elements}" var="product" varStatus="status">
                    <c:if test="${(status.count - 2)%3==0 }">
                        <div class="shu"></div>
                    </c:if>
                    <div class="site" title="${product.name}">
                        <div class="title"><a href="/product.do?detail&id=${product.id}">${product.name}</a></div>
                        <div class="bigpic"><a href="/product.do?detail&id=${product.id}"><img src="${product.picurl}" class="autoImg" align="absmiddle"/></a></div>
                        <p>
                            时间 : <fmt:formatDate value="${product.starttime}" pattern="MM-dd HH:mm"/>
                            <c:if test="${not empty product.recommend}"><span class="recommend">推荐：${product.recommend}</span></c:if><br/>
                            分类：<b style="color:#5183C0;">${product.categorys}</b><br/>
                            商城：<b style="color:#888888;">${product.fromwhere}</b><br/>
                            详细 : <a href="/product.do?detail&id=${product.id}">${product.detail}</a>
                        </p>
                    </div>
                    <c:if test="${status.count%3==0}">
                        <div class="hr"></div>
                    </c:if>
                    <c:if test="${(status.count - 2)%3==0 }">
                        <div class="shu"></div>
                    </c:if>
                </c:forEach>
                <zk:page page="${actionBean.page}"/>
            </div>
        </div>
    </div>
    <!-- main end -->
    <%--<div class="clear"></div>--%>

    <%--<div id="scrollDiv">--%>
        <%--<ul>--%>
            <%--<li><a href="#"><img src="/image/brand/locklock.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/maibaobao.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/baili.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/meiji.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/dove.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/jackjones.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/daphne.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/miracle.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/bencao.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/wenger.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/odifen.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/bossini.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/handu.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/gainreel.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/lining.png" alt=""></a></li>--%>
            <%--<li><a href="#"><img src="/image/brand/aimu.png" alt=""></a></li>--%>
        <%--</ul>--%>
    <%--</div>--%>

    <!-- foot start -->
    <%@ include file="decorators/foot.jsp"%>
    <!-- foot end -->

<%--    test
    <br/><br/><br/><br/><br/>
    <div class="product">
        <div class="p_t"></div>

        <div class="p_m">
            <div class="l_bg"></div>
            <div class="p_content">
                JBL是世界著名的专业音箱品牌。这款JBL On Stage IIIP 是专为iPod和iPhone设计的基站音箱，外型简洁美观；内置四个奥德赛钕磁铁驱动器（3W*4），支持对iPod和iPhone等设备的充电及数据同步功能，并可通过随机配置的Griffin AirClick遥控器进行操作；设有3.5mm音频输入接口，方便连接其他播放器使用；供电方面，6节5号电池可提供约16小时续航。外形尺寸：50*190mm，重约0.9kg。此产品无法用于带Lightning接口的苹果主机设备，如iPhone 5，请在购买前确认。
            </div>
            <div class="r_bg"></div>
        </div>

        <div class="p_b"></div>

    </div>
    <br/><br/><br/><br/><br/>
    test--%>



</div>
</body>
</html>
<script type="text/javascript">
    function setImg(img,width,height){
        var scale_w=img.width/width;
        var scale_h=img.height/height;
        var scale=scale_w>scale_h?scale_w:scale_h;
        img.width=img.width/scale;
        return false;
    }
    $(document).ready(function(){
        $("#a_style_list").click(function(){
            $("#style_list").fadeIn();
            $("#style_window").fadeOut();
        })
        $("#a_style_window").click(function(){
            $("#style_window").fadeIn();
            $("#style_list").fadeOut();
        })
        $(".autoImg").each(function(){
            setImg(this,150,150);
        });
        if(${actionBean.style} == 1){
            $("#style_list").hide();
            $("#style_window").show();
        }

    });
</script>